<template>
  <div class="reports">
    <div class="report" v-for="(item, index) in list" :key="item.id">
      <div class="type" v-if="item.industry.id == 1">
        {{ item.type.name }}
      </div>
      <div class="industry" v-else>
        {{ item.industry.name + "行业" }}
      </div>
      <div class="middle">
        <a class="report-name" :href="'/detail/' + item.id" target="_blank">{{
          item.name
        }}</a>
        <div class="meta">
          <div class="meta-item">
            <i class="el-icon-time"></i>
            {{ item.time_text }}
          </div>
          <div class="meta-item" v-if="item.researcher">
            <i class="el-icon-user"></i>
            {{ item.researcher.name }}
          </div>
          <div class="meta-item" v-if="item.organization">
            <i class="el-icon-office-building"></i>
            {{ item.organization.name }}
          </div>
          <div class="meta-item">
            <i class="el-icon-document"></i>
            {{ item.page_count }}页
          </div>
        </div>
      </div>
      <div class="option">
        <i class="el-icon-download"></i>
        下载
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  computed: {},
  props: {
    list: {
      type: Array,
      default: [],
    },
  },
  created() {},
  methods: {},
};
</script>

<style lang="less" scoped>
.reports {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 20px;
}
.report {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e9ebee;
}
.type {
  width: 80px;
  height: 60px;
  background: #ffebec;
  border: 1px solid #ffa5a5;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 14px;
  color: #d34b4b;
  line-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.industry {
  width: 80px;
  height: 60px;
  background: #e8f1ff;
  border: 1px solid #a5c6ff;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 14px;
  color: #275f9d;
  line-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
}

.middle {
  margin-left: 20px;
  width: calc(100% - 180px);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-around;
}

.report-name {
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 16px;
  color: #3f4750;
  cursor: pointer;
  text-decoration: none;
}
.report-name:hover {
  color: #388ae9;
}

.meta {
  display: flex;
  align-items: center;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 14px;
  color: #8e969d;
}
.meta-item {
  margin-right: 12px;
  display: flex;
  align-items: center;
  i {
    margin-top: 1px;
    margin-right: 2px;
  }
}
.option {
  width: 80px;
  height: 32px;
  margin-left: 20px;
  border-radius: 20px;
  border: 1px solid #8e969d;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 14px;
  color: #8e969d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.option:hover {
  background: #a5c6ff;
  color: #333;
  border: 1px solid #388ae9;
}
</style>